Sublime Text 3 complie and run Java code

Sublime Text 3 complie and run Java code

Tools ->Build System-> New build system

Paste:

1
2
3
4
5
6
7
{
"cmd": ["javac", "$file_name","&&","java", "$file_base_name"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
**"path": "C:\\Program Files\\Java\\jdk1.6.0\\bin\\",**
"selector": "source.java",
"shell": true
}

Note that replace your own path of jdk in ** **,and save it as "java.sublime-bulid"

Chose Build system ->java and press Ctrl-B to complie and run you java code.

请我喝杯咖啡吧!